/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: mirac
 * Date: 2025-04-21
 * Time: 23:39
 */
public class Chech_numcount {
    public static int Check(int[] arr) {
        int count = 0;
        for(int i = 0; i < arr.length; i++) {
            count = 0;
            for(int j = 0; j <arr.length; j++) {
                if(arr[i] == arr[j]) {
                    count++;
                }
            }
            if(count == 1) {
                return arr[i];
            }
        }
        return -1;
    }
    public static void main(String[] args) {
        int[] arr = {2,2,1};
        int x = Check(arr);
        System.out.println(x);
    }
}
